package cn.demo.test

import java.io.ObjectOutputStream
import java.net.Socket

object Driver {
  def main(args: Array[String]): Unit = {
    val client = new Socket("127.0.0.1", 8848)
    println("client created, waiting input data...")

    val outStream = client.getOutputStream

    val objectOut = new ObjectOutputStream(outStream)
    val task = new Task()
    objectOut.writeObject(task)

    outStream.flush()
    println("data write success, waiting server take...")
    outStream.close()
    client.close()
  }
}
